package com.iedu.demo.lgq.service;

import com.iedu.demo.lgq.entity.TbUser;
import com.iedu.demo.lgq.entity.TbUserAddress;
//import com.iedu.demo.lgq.mapper.UserMapper;
//import org.apache.ibatis.annotations.Param;
//import org.apache.ibatis.annotations.Select;
//import org.springframework.beans.factory.annotation.Autowired;
//
//import java.security.PrivateKey;
import java.util.List;

public interface UserService {

    TbUser login(String uid, String pwd);

    void addUser(TbUser newUser);

    List<TbUser> findAll();

    List<TbUser> findByWhere(TbUser sysUser);

    // 更新用户状态
    boolean updateUserStatus(String userId, int state);

    // 更新用户头像
    boolean updateUserAvatar(String userId, String avatarUrl);

    // 验证邮箱
    boolean verifyEmail(String userId, String email);

    boolean updateUserDetails(TbUser user);
    //插入收货地址
    boolean addUserAddress(String userName, String regionId, String cityId, String address, String tel, String realName);

    //查找用户
    TbUser findById(String userName);
    // 获取用户收货地址列表
    List<TbUserAddress> getUserAddresses(String userName);

    // 获取某个用户指定地址
    TbUserAddress getUserAddressById(Long addressId);

}
